home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / LANG / ADA / GNAT / !gcc / adainc / 2 / ads / a-storio < prev    next >
Text File  |  1996-02-12  |  2KB  |  49 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                         GNAT RUNTIME COMPONENTS                          --
  4. --                                                                          --
  5. --                       A D A . S T O R A G E _ I O                        --
  6. --                                                                          --
  7. --                                 S p e c                                  --
  8. --                                                                          --
  9. --                            $Revision: 1.8 $                              --
  10. --                                                                          --
  11. -- This specification is adapted from the Ada Reference Manual for use with --
  12. -- GNAT.  In accordance with the copyright of that document, you can freely --
  13. -- copy and modify this specification,  provided that if you redistribute a --
  14. -- modified version,  any changes that you have made are clearly indicated. --
  15. --                                                                          --
  16. ------------------------------------------------------------------------------
  17.  
  18.  
  19. with Ada.IO_Exceptions;
  20. with System.Storage_Elements;
  21.  
  22. generic
  23.    type Element_Type is private;
  24.  
  25. package Ada.Storage_IO is
  26. pragma Preelaborate (Storage_IO);
  27.  
  28.    Buffer_Size : constant System.Storage_Elements.Storage_Count :=
  29.       (Element_Type'Size + System.Storage_Unit - 1) / System.Storage_Unit;
  30.  
  31.    subtype Buffer_Type is
  32.      System.Storage_Elements.Storage_Array (1 .. Buffer_Size);
  33.  
  34.    ---------------------------------
  35.    -- Input and Output Operations --
  36.    ---------------------------------
  37.  
  38.    procedure Read  (Buffer : in  Buffer_Type; Item : out Element_Type);
  39.  
  40.    procedure Write (Buffer : out Buffer_Type; Item : in  Element_Type);
  41.  
  42.    ----------------
  43.    -- Exceptions --
  44.    ----------------
  45.  
  46.    Data_Error : exception renames IO_Exceptions.Data_Error;
  47.  
  48. end Ada.Storage_IO;
  49.